Skip to content

remote-test-client: Exit code 128 + <signal-number> instead of 3 #143448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Enselic
Copy link
Member

@Enselic Enselic commented Jul 4, 2025

If the remote process is terminated by a signal, make remote-test-client exit with the code 128 + <signal-number> instead of always 3. This follows common practice among tools such as bash 1:

When a command terminates on a fatal signal whose number is N, Bash uses the
value 128+N as the exit status.

It also allows us to differentiate between run-pass and run-crash ui tests without special case code in compiletest for that when remote-test-client is used. See #143002 and in particular #143002 (comment).

Footnotes

  1. https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html

If the remote process is terminated by a signal, make `remote-test-client` exit
with the code `128 + <signal-number>` instead of always `3`. This follows common
practice among tools such as bash [^1]:

> When a command terminates on a fatal signal whose number is N, Bash uses the
> value 128+N as the exit status.

It also allows us to differentiate between `run-pass` and `run-crash` ui tests
without special case code in compiletest for that when `remote-test-client` is
used.

[^1]: https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants